Forecast Hospital cases using Prophet model using extra regressor variables from vaccine data for those who received 1st dose of vaccine in the older age groups (50 - 80). 3 days of forecast.

Initial Data Cleaning

Vaccine data, Cases data from the hospital, and the waste water signal data has been loaded, cleaned, and then merged into one final dataframe, final_data.

The variables have been log transformed.

The response variable observed_census_ICU_p_acute_care has been renamed as y and the date has been renamed as ds to fit the prophet model.

The dataset is divided into train and test set. The test set consist of last 3 days of data.

Adding other variable as regressors to the model.

Fitting the Prophet Model.

Forecasting 3 days into future

Checking last 6 day of forecast data

#>             ds     yhat yhat_lower yhat_upper
#> 407 2022-01-27 4.355616   3.548674   5.241160
#> 408 2022-01-28 4.383514   3.526095   5.193084
#> 409 2022-01-29 4.371289   3.577778   5.209238
#> 410 2022-01-30 4.528213   3.695618   5.345872
#> 411 2022-01-31 4.304257   3.462451   5.122942
#> 412 2022-02-01 4.379030   3.448301   5.185204

The plot of actual data and predicted data from Prophet forecast. The blue line is predicted data whereas the black dots are actual data.

Root Mean Squared Error on train data:

#> [1] 16.22797

MAPE on train set:

#> [1] 0.3745564

Standard deviation of the actual data

#> [1] 35.92902

Plots comparing actual data and predicted data

RMSE on test set

#> [1] 7.161951

MAPE on test set

#> [1] 0.08547305

Plots comparing actual data and predicted data

The error metrics are low when model is regressed against only those who received 1st dose in the older age groups.

Component plot showing yearly and weekly trend of the model.

The model trend shows a strong linear decrease in cases until July 2021 and then it shows a weak to moderate linear increases until January 2022. The extra regressor plot shows the additive effect of regressors and it shows that 1st dose of vaccination in older age groups shows a strong linear increase until April/May 2021 and then remains steady after July 2021 until January 2022. Weekly trend shows there are more hospitalizations on Tuesday and Thursday.